local qiangyi = fk.CreateSkill {
  name = "hx_1v2__qiangyi",
}
Fk:loadTranslationTable {
  ["hx_1v2__qiangyi"] = "强易",
  [":hx_1v2__qiangyi"] = "每名角色限一次，出牌阶段，你可以获得一名其他角色一张牌然后交给其一张牌。‌‌",
  ["#hx_1v2__qiangyi"] = "强易：你可以获得一名其他角色一张牌然后交给其一张牌。每名角色限一次。‌‌",
  ["#hx_1v2__qiangyi-player"] = "强易：获得 %dest 的一张牌，然后交给其一张牌",
  ["#hx_1v2__qiangyi-to"] = "强易：交给 %dest 一张牌",
}

qiangyi:addEffect("active", {
  prompt = "#hx_1v2__qiangyi",
  anim_type = "control",
  card_num = 0,
  target_num = 1,
  target_filter = function(self, player, to_select, selected)
    return #selected == 0 and to_select ~= player and not table.contains(to_select:getTableMark("hx_1v2__qiangyi"), player.id) and #to_select:getCardIds("he") > 0
  end,
  can_use = function(self, player)
    return table.find(Fk:currentRoom().alive_players, function(p)
      return not table.contains(p:getTableMark("hx_1v2__qiangyi"), player.id)
    end)
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    room:addTableMarkIfNeed(to, "hx_1v2__qiangyi", player.id)
    local cards = room:askToChooseCards(player, {
      target = to,
      skill_name = qiangyi.name,
      min = 1,
      max = 1,
      flag = "he",
      prompt = "#hx_1v2__qiangyi-player::" .. to.id,
    })
    room:obtainCard(player, cards, false, fk.ReasonPrey, player, qiangyi.name)
    local back = room:askToCards(player, {
      max_num = 1,
      min_num = 1,
      include_equip = true,
      skill_name = qiangyi.name,
      cancelable = false,
      prompt = "#hx_1v2__qiangyi-to::" .. to.id,
    })
    room:obtainCard(to, back, true, fk.ReasonGive, player, qiangyi.name)
  end,
})


return qiangyi
